home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Top 200 Programs
/
Top 200 Programs.iso
/
Bob8
/
THOMPSON
/
LIBERTY
/
PRODUCT
/
LB14W.EXE
/
CALLDLL6.BAS
< prev
next >
Wrap
BASIC Source File
|
1996-02-01
|
1KB
|
56 lines
'CALLDLL6.BAS - Make various API calls to play wave files, track
'the mouse, and move a window around. Similar to CALLDLL5.BAS
nomainwin
struct point, x as short, y as short
open "kernel" for dll as #kernel
open "user" for dll as #user
open "mmsystem" for dll as #mmsystem
statictext #aWindow.text, "", 5, 5, 60, 20
open "Me" for window as #aWindow
print str$(playMode)
wavefile$ = "chimes.wav"
playMode = 0
calldll #mmsystem, "sndPlaySound", _
wavefile$ as ptr, _
playMode as ushort, _
result as bool
hndl = hwnd(#aWindow)
for i = 1 to 150
calldll #user, "GetCursorPos", _
point as struct, _
result as void
x = point.x.struct
y = point.y.struct
print #aWindow.text, x; ", "; y
calldll #user, "MoveWindow", _
hndl as word, _
x as short, _
y as short, _
100 as short, _
100 as short, _
1 as word, _
result as void
next x
close #kernel
close #user
close #mmsystem
close #aWindow
notice "Done."
end